FUNCTION ZFIFM_VIM_DETERM_NPO_AP_CHECK.
*"----------------------------------------------------------------------
*"*"本地接口：
*"  IMPORTING
*"     REFERENCE(IV_NO_UPDATE) TYPE  FLAG OPTIONAL
*"     REFERENCE(IV_PROC_TYPE) TYPE  /OPT/PROCESS_TYPE OPTIONAL
*"  EXPORTING
*"     REFERENCE(TAB_DSPMSG) TYPE  /OPT/STRUCT_MESSAGE_TABLE_T
*"  TABLES
*"      INDEX_ITEM TYPE  /OPT/CIDH_1ITEM_T
*"  CHANGING
*"     REFERENCE(INDEX_DATA) TYPE  /OPT/VIM_1HEAD OPTIONAL
*"  EXCEPTIONS
*"      CHECK_FAILED
*"----------------------------------------------------------------------

  DATA:
    LS_DSPMSG   TYPE /OPT/STRUCT_MESSAGE,
    LV_ITEM_AMT TYPE /OPT/VIM_1HEAD-GROSS_AMOUNT.

  IF INDEX_DATA-CUSTOM_FIELD4 IS INITIAL.
    CLEAR   LS_DSPMSG.
    LS_DSPMSG-PROC_TYPE = IV_PROC_TYPE.
    LS_DSPMSG-MSGTYP = 'E'.
    LS_DSPMSG-MSGID = 'ZFI02'.
    LS_DSPMSG-MSGNR = 002.
    APPEND  LS_DSPMSG TO TAB_DSPMSG.
  ENDIF.

  IF TAB_DSPMSG[] IS NOT INITIAL.
    RAISE CHECK_FAILED.
  ENDIF.
ENDFUNCTION.
